<html>
<?php
include('config.php');



if(isset($_GET['id']))
{
echo $id=$_GET['id'];

//echo $quer="select * from addd where id=$id";

$quer="select * from addd where id=$id";
$query1=mysqli_query($con,$quer);
$query2=mysqli_fetch_array($query1);
}
if(isset($_POST['submit']))
{
$nam=$_POST['name'];
$age=$_POST['age'];
$ddd="update addd set name='$nam',age='$age' where id=$id";
$dd=mysqli_query($con,$ddd);
if(dd)
{

header('location:ind.php');

}

}
?>
<form method="post" action="" style="padding-left:40%;padding-top:10%">

<input type="text" name="name" value="<?php echo $query2["NAME"]?> "/><br/><br/>
<input type="text" name="age" value="<?php echo $query2["AGE"] ?>"/><br/><br/>
<input type="submit" name="submit" vlaue="submit"/> 

</form>

</html>
